<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/angular.min.js" ></script>
	</head>
	<body>

		<div ng-app="myapp" ng-controller="myctrl">
		
				<table border="1">
					<tr>
						<td>商品id</td>
						<td>商品名称</td>
						<td>商品价格</td>
					</tr>
					<tr ng-repeat="product in products">
						<td>{{$index}}</td>
						<td>{{product.name}}</td>
						<td>{{product.price}}</td>
					</tr>
				</table>
			
		</div>
		
		<script>
			/*初始化app模块*/
			var myapp = angular.module("myapp",[]);
		
			myapp.controller("myctrl",function($scope){
				$scope.products=[
					{
						name:"冬凌草",
						price:"六千三毫"
					},{
						name:"草寒丹",
						price:"一品五千"
					},{
						name:"冬凌草",
						price:"六千三毫"
					}
				]
			});
			
		</script>
		
		
	</body>
</html>
